Sorry wrong question ... i passed it as a normal parameter and it wo=
rked.
now i want to call this Telnet-object $t in host.pm ... =
how do i do that??
ZE=3D1> Don't be flakey.
http://mobile.yahoo.com/mail">Get Yahoo! Mail for Mobile and
href=3D"http://us.rd.yahoo.com/evt=3D43909/*http://mobile.ya hoo.com/mail=
">always stay connected to friends.__________________________________=
_____________
ActivePerl mailing list
ActivePerl@listserv.ActiveSta=
te.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs<=
/BLOCKQUOTE>
Any questions? Get answers on any topic at
//answers.yahoo.com/;_ylc=3DX3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEw OARfcwMzOTY1N=
DUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx">Yahoo! Answers. Try =
it now.
--0-1384683666-1173161966=:21103--
--===============2030262884==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============2030262884==--
Re: How can i pass an object like $t from my .pl to .pm file
am 06.03.2007 07:43:40 von ukhas jean
--===============0043356526==
Content-Type: multipart/alternative; boundary="0-162994645-1173163420=:44719"
Content-Transfer-Encoding: 7bit
--0-162994645-1173163420=:44719
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Hello Bill et al,
=20
I am using perl 5.8 on windowsXP. till now i have been running scripts =
using the .pl file.
i have to send a few files to the client hence would require to convert=
my code (comprising of .pl and .pm files) into .exe
=20
q. 1. which is the best tool for this?? (since google is giving me show=
many options!)
=20
q. 2. also this .exe the client may run on windows/unix. will the creat=
ion of an .exe on windows affect its performance on unix??
=20
(PS:: i aint using any OS-specific command in my script)
Bill Luebkert wrote:
ukhas jean wrote:
> Hello all ...
>=20
> I have created a Net::Telnet object (say $t) in my script ... say a.pl=20
> ... but since the code for "a.pl" is increasing; i decided to created=20
> "modules" eg. host.pm.
>=20
> now i want to call this Telnet-object $t in host.pm ... how do i do tha=
t??
>=20
> How can i pass an object like $t from my .pl to .pm file???
> Any pointers are really appreciated.
Once you've included host.pm with a use, you can pass it as an arg to
a sub or use it globally.
our $tobj =3D new Net::Telnet or die ...
my $ret =3D host::somesub ($tobj); # pass object into sub in host.pm
or if you've inported the sub: my $ret =3D somesub ($tobj);
host.pm subs could access $tobj directly also (less structured) in host.p=
m.
sub somesub { # access main global $tobj from host.pm
print Data::Dumper->Dump([$main::tobj], [qw($main::tobj)]);
}
=20
---------------------------------
Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta.
--0-162994645-1173163420=:44719
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Hello Bill et al,
I am using perl 5.8=
on windowsXP. till now i have been running scripts using the .pl file.=
div>
i have to send a few files to the client hence would require t=
o convert my code (comprising of .pl and .pm files) into .exe
>
q. 1. which is the best tool for this?? (since google=
is giving me show many options!)
q. 2. al=
so this .exe the client may run on windows/unix. will the creation of an =
..exe on windows affect its performance on unix??
=
(PS:: i aint using any OS-specific command in my script)
>Bill Luebkert <dbecoll@roadrunner.com> wrote:
LOCKQUOTE class=3Dreplbq style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BO=
RDER-LEFT: #1010ff 2px solid">ukhas jean wrote:
> Hello all ...
=
>
> I have created a Net::Telnet object (say $t) in my script .=
... say a.pl
> ... but since the code
for "a.pl" is increasing; i decided to created
> "modules" eg. ho=
st.pm.
>
> now i want to call this Telnet-object $t in host.=
pm ... how do i do that??
>
> How can i pass an object like =
$t from my .pl to .pm file???
> Any pointers are really appreciated=
..
Once you've included host.pm with a use, you can pass it as an a=
rg to
a sub or use it globally.
our $tobj =3D new Net::Telnet o=
r die ...
my $ret =3D host::somesub ($tobj); # pass object into su=
b in host.pm
or if you've inported the sub: my $ret =3D somesub ($=
tobj);
host.pm subs could access $tobj directly also (less structu=
red) in host.pm.
sub somesub { # access main global $tobj from hos=
t.pm
print Data::Dumper->Dump([$main::tobj], [qw($main::tobj)]);
>}
Expecting? Get great news right away with
us.rd.yahoo.com/evt=3D49982/*http://advision.webevents.yahoo .com/mailbeta=
/newmail_tools.html">email Auto-Check.
Try the
s.rd.yahoo.com/evt=3D49982/*http://advision.webevents.yahoo. com/mailbeta/=
newmail_tools.html">Yahoo! Mail Beta.
--0-162994645-1173163420=:44719--
--===============0043356526==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============0043356526==--
Re: How can i pass an object like $t from my .pl to .pm file
am 06.03.2007 08:25:27 von ken1
> q. 1. which is the best tool for this?? (since google is giving me show
> many options!)
Always dangerous to name something 'best'...so I'll just give a
recommendation based on what I use. Doesn't necessarily mean the other
alternatives won't work - I just have no experience with anything else.
So: try the PDK (Perl Dev Kit) from ActiveState.
>q. 2. also this .exe the client may run on windows/unix. will the creation
>of an .exe on windows affect its performance on unix??
You misunderstand the issue. A windows .exe will never run on Unix. Instead,
the PDK has multiple implementations for various Windows and Unix flavors,
thus enabling you to build executables for each platform (so you need access
to platform P to build an executable for it - no 'cross compiling').
HTH,
ken1
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: How can i pass an object like $t from my .pl to .pm file
am 06.03.2007 08:27:51 von intertwingled
Actually, a Windows .exe CAN run on Linux, under Wine. =3D)
Tony
Kenneth Ölwing wrote:
>> q. 1. which is the best tool for this?? (since google is giving me show =
>> many options!)
> =
> Always dangerous to name something 'best'...so I'll just give a =
> recommendation based on what I use. Doesn't necessarily mean the other =
> alternatives won't work - I just have no experience with anything else.
> =
> So: try the PDK (Perl Dev Kit) from ActiveState.
> =
>> q. 2. also this .exe the client may run on windows/unix. will the creati=
on =
>> of an .exe on windows affect its performance on unix??
> =
> You misunderstand the issue. A windows .exe will never run on Unix. Inste=
ad, =
> the PDK has multiple implementations for various Windows and Unix flavors=
, =
> thus enabling you to build executables for each platform (so you need acc=
ess =
> to platform P to build an executable for it - no 'cross compiling').
> =
> HTH,
> =
> ken1 =
> =
> _______________________________________________
> ActivePerl mailing list
> ActivePerl@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> =
> =
-- =
I always have coffee when I watch radar!
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: How can i pass an object like $t from my .pl to .pm file
am 06.03.2007 08:56:43 von Bill Luebkert
ukhas jean wrote:
> Hello Bill et al,
>
> I am using perl 5.8 on windowsXP. till now i have been running scripts
> using the .pl file.
> i have to send a few files to the client hence would require to convert
> my code (comprising of .pl and .pm files) into .exe
>
> q. 1. which is the best tool for this?? (since google is giving me show
> many options!)
You've got Activestate's PDK, perl2exe and PAR. Google away.
> q. 2. also this .exe the client may run on windows/unix. will the
> creation of an .exe on windows affect its performance on unix??
Obviously the exe has to be for the target system or possbily run under
emulation.
> (PS:: i aint using any OS-specific command in my script)
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: How can i pass an object like $t from my .pl to .pm file
am 06.03.2007 19:08:24 von Jeff Griffiths
We don't test that tho, so YMMV. Just compile on the platform you =
want to run on!
JeffG
On 5-Mar-07, at 11:27 PM, Anthony R. Nemmer wrote:
> Actually, a Windows .exe CAN run on Linux, under Wine. =3D)
>
> Tony
>
> Kenneth Ölwing wrote:
>>> q. 1. which is the best tool for this?? (since google is giving =
>>> me show
>>> many options!)
>>
>> Always dangerous to name something 'best'...so I'll just give a
>> recommendation based on what I use. Doesn't necessarily mean the =
>> other
>> alternatives won't work - I just have no experience with anything =
>> else.
>>
>> So: try the PDK (Perl Dev Kit) from ActiveState.
>>
>>> q. 2. also this .exe the client may run on windows/unix. will the =
>>> creation
>>> of an .exe on windows affect its performance on unix??
>>
>> You misunderstand the issue. A windows .exe will never run on =
>> Unix. Instead,
>> the PDK has multiple implementations for various Windows and Unix =
>> flavors,
>> thus enabling you to build executables for each platform (so you =
>> need access
>> to platform P to build an executable for it - no 'cross compiling').
>>
>> HTH,
>>
>> ken1
>>
>> _______________________________________________
>> ActivePerl mailing list
>> ActivePerl@listserv.ActiveState.com
>> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>>
>>
>
> -- =
>
> I always have coffee when I watch radar!
> _______________________________________________
> ActivePerl mailing list
> ActivePerl@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>
>
Jeff Griffiths
jeffg@activestate.com
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs